Golang - 條件式與迴圈



if-else

if condition {
    ...
} else {
    ...
}

switch

switch condition {
case c1:
    ...
case c2:
    ...
default:
    ...
}

for

for i := 0; i < count; i++ {
    ...
}

while

for {
    ...
}
#golang #GO







你可能感興趣的文章

JS註冊組|函式、方法與物件|JavaScript&jQuery網站互動設計程式進化之道

JS註冊組|函式、方法與物件|JavaScript&jQuery網站互動設計程式進化之道

讓WebStorm識別alias

讓WebStorm識別alias

函式 Function

函式 Function






留言討論